<?php /* Smarty version 2.6.18, created on 2010-03-14 18:19:38
         compiled from stockuploading.tpl */ ?>
<div id="blanket" style="display:none;"></div>
<div id="download" style="position:absolute;background-color:#fff;width:400px;z-index: 1002;display:none;">
</div>
<form name="mainForm" method="POST" id="mainForm" enctype="multipart/form-data" action="/account/readuploadFile">
<input type="hidden" name="MAX_FILE_SIZE" value="50000000" />
    	<h1>Stock Uploading</h1>
    	<p style="vertical-align: top;">
        <div class="blue">
		<p class="right"><input type="button" value="Download Inventory File" onclick="downloadfile();">&nbsp;<input type="button" value="Save" onclick="savestockupload();" /></p>
		<table border="0" width="100%">
			<tr>
				<td>File to upload:&nbsp;<input id="uploadFile" type="file" name="uploadedFile">&nbsp;&nbsp;<input type="button" value="Load" id="uploadButton" onclick="load();"></td>
				
			</tr>
		<tr>
			<td style="background-color:red;width:5%;color:white">Red Color Row - Invalid Entry</td>
		</tr>
		</table>
        </div>  
            <div id="results">
                 
				 <table border="0"	width="100%">
					<tr><td colspan="14"><hr></td></tr>
					<tr >
						<td>MOID</td>
						<td>Common Name</td>
						<td>Size</td>
						<td>Tank</td>
						<td>Quantity</td>
						<td>Cost</td>
						<td>Total Cost</td>
					</tr>
					<tr><td colspan="14"><hr></td></tr>
					
				 </table>
            	</div>                
            </div>
        </p>
</form>
<script language="javascript">
<?php echo '
	function downloadfile(){
		//openWindow("/account/downloadInventory",\'rejectreason\',470,290, \'scrollbars=yes\');
		doajaxAction("/account/downloadInventory",1,\'download\',document.getElementById(\'mainForm\'));
		popup("download");
	}
	
	function load(){
		doajaxAction("/account/readuploadFile",1,\'results\',document.getElementById(\'mainForm\'),false,true);
	
	}
	
	function savestockupload(){
		doajaxAction("/account/saveuploadFile",1,\'results\',document.getElementById(\'mainForm\'),false);
	}
'; ?>

</script>